Make release manifest shortNames legal install slugs - #397
Open
Maximo-Guk wants to merge 1 commit into
Open
Conversation
|
Posted 1 actionable inline finding. |
Preview:
|
The deploy wizard sends a gatekeeper's manifest shortName as the install slug verbatim, and the deploy service turns that slug into a GATEKEEPER_<SLUG> binding name, so it rejects anything outside /^[a-z][a-z0-9]*$/. gatekeeper-mcp-portal was the only installable gatekeeper whose shortName carried a hyphen, so installing Mcp-Portal failed zod validation on the first line of install() — before the workflow was ever created, surfacing to users as a redacted "Something unexpected went wrong on our side." with no workflow logs. Fold the release manifest's shortName into the slug charset via a new releaseShortName(), leaving gatekeeperShortName() alone: staging and preview bind gatekeepers as GATEKEEPER_<PKG_NAME> and the router maps _ back to -, so a hyphen does round-trip there and folding globally would point their BASE_URL at a 404. Assert in the generator test that every emitted shortName is a legal slug. The client passes shortName through unfolded, so this is what turns the next hyphenated gatekeeper into a release-build failure instead of a runtime 500. mcp-portal's deployed path becomes /gatekeeper/mcpportal, which stays self-consistent end to end; it registers no external redirect URI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Maximo-Guk
force-pushed
the
maximo/release-slug-safe-shortname
branch
from
September 2, 2026 02:04
6a0a701 to
205cd03
Compare
|
@Maximo-Guk Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
1 similar comment
|
@Maximo-Guk Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
|
LGTM! |
Maximo-Guk
marked this pull request as ready for review
September 2, 2026 15:24
| * bindings (underscores, router maps _ -> -) where a hyphen does round-trip. | ||
| */ | ||
| export function releaseShortName(pkgName: string): string { | ||
| return gatekeeperShortName(pkgName).replace(/[^a-z0-9]/g, ""); |
There was a problem hiding this comment.
🟡 Invalid slugs survive manifest generation
A suffix that folds empty, starts with a digit, or exceeds 20 characters makes releaseShortName return an invalid install slug. generateManifest can publish a connector that every installation rejects.
Suggested change
| return gatekeeperShortName(pkgName).replace(/[^a-z0-9]/g, ""); | |
| const shortName = gatekeeperShortName(pkgName).replace(/[^a-z0-9]/g, ""); | |
| if (!/^[a-z][a-z0-9]{0,19}$/.test(shortName)) { | |
| throw new Error(`${pkgName} does not fold to a legal install slug`); | |
| } | |
| return shortName; |
Was this helpful? React with 👍 or 👎 to provide feedback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The deploy wizard sends a gatekeeper's manifest shortName to the deploy service as the install slug verbatim, and the service turns that slug into a GATEKEEPER_ binding name - so it validates against
/^[a-z][a-z0-9]*$/. gatekeeper-mcp-portal was the only installable gatekeeper whose derived shortName carried a hyphen, so mcp-portal failed zod validation on the first line of install(), before the workflow was ever created. Users saw a redacted "Something unexpected went wrong on our side." with no workflow logs to debug from.Also added tests for
shortName is a legal slug and matches its BASE_URL path,releaseShortName() folds correctly and no-ops on conforming names,shortNames are unique across the real manifest